package com.huluobo.high3demo.adapter;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.high3demo.R;
import com.huluobo.mvvm.baen.LoveVideoBeanResult;
import com.huluobo.mvvm.utils.ImageLoader;

import java.util.List;

/**
 * Created by LC on 2023/10/6.
 */
public class WorksAdapter extends BaseQuickAdapter<LoveVideoBeanResult.LoveVideoBean, BaseViewHolder> {
    public WorksAdapter(@Nullable List<LoveVideoBeanResult.LoveVideoBean> data) {
        super(R.layout.item_works, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, LoveVideoBeanResult.LoveVideoBean loveVideoBean) {
        baseViewHolder.setText(R.id.item_works_tv, loveVideoBean.getAuthname());
        ImageView imageView = baseViewHolder.findView(R.id.item_works_iv);
        ImageLoader.getInstance().loadImage(getContext(), loveVideoBean.getVideomainimg(), imageView);
    }
}
